﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Common.Extension;

namespace HotTopic.collector
{
     abstract class AbstractCollector
    {
        //获取主题，（主题名=>股票代码列表)
        public Dictionary<String, List<String>> GetTopics()
        {
//            Dictionary<String, List<string>> industryMap = GetIndustryMap();
//            Dictionary<String, List<string>> areaMap = GetAreaMap();
            Dictionary<String, List<string>> conceptMap = GetConceptMap();
//            Dictionary<String, List<String>> otherTopicMap = GetOtherTopicMap();
            Dictionary<String, List<string>> resultMap = new Dictionary<string, List<string>>();

            resultMap
                //.AddRange(industryMap, true)
                //.AddRange(areaMap, true)
//                .AddRange(otherTopicMap, true)
                .AddRange(conceptMap, true);
            return resultMap;
        }

        //获取其他主题,用于扩展除了行业，概念，地区这三类的其他主题。
        protected virtual Dictionary<string, List<string>> GetOtherTopicMap()
        {
            return new Dictionary<string, List<string>>();
        }
        //获取行业主题（主题名=>股票代码列表）
        protected abstract Dictionary<String, List<string>> GetIndustryMap();

        //获取概念主题（主题名=>股票代码列表）
        protected abstract Dictionary<String, List<string>> GetConceptMap();

        //获取地区主题（主题名=>股票代码列表）
        protected abstract Dictionary<String, List<string>> GetAreaMap();
    }
}